﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.AddIn.Pipeline;

namespace SimpleAddinTest
{
    public class DesignerHostAdapters
    {
        IDesignerContract proxy;

        public DesignerHostAdapters(IDesignerContract proxy)
        {
            this.proxy = proxy;
        }

        public FrameworkElement GetDesignView()
        {
            return FrameworkElementAdapters.ContractToViewAdapter(this.proxy.GetDesignView());
        }

        public FrameworkElement GetPropertyGrid()
        {
            return FrameworkElementAdapters.ContractToViewAdapter(this.proxy.GetPropertyGrid());
        }

        public void Load(string file)
        {
            this.proxy.Load(file);
        }

        public void Save(string file)
        {
            this.proxy.Save(file);
        }

        public DesignerAddIn GetWFItem() 
        {
          return  proxy.GetWFItem();
        }

       public void SetName(People p) 
        {
            proxy.SetName(p);
        }

    }
}
